<div class="panel panel-default panel-intro">
    {:build_heading()}

    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="one">
                <div class="widget-body no-padding">
                    <div id="toolbar" class="toolbar">
                        {:build_toolbar('refresh,add,edit,del')}
                    </div>
                    <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
                           data-operate-edit="{:$auth->check('manufacture/costtype/edit')}" 
                           data-operate-del="{:$auth->check('manufacture/costtype/del')}" 
                           width="100%">
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    var Table = $("#table").bootstrapTable({
        url: 'manufacture/costtype/index',
        pk: 'id',
        sortName: 'id',
        columns: [
            [
                {checkbox: true},
                {field: 'id', title: __('Id'), sortable: true},
                {field: 'type_name', title: __('类型名称'), operate: 'LIKE'},
                {field: 'type_code', title: __('类型编码'), operate: 'LIKE'},
                {field: 'description', title: __('描述'), operate: false},
                {field: 'status', title: __('状态'), searchList: {"1":__('正常'),"0":__('禁用')}, formatter: Table.api.formatter.status},
                {field: 'createtime', title: __('创建时间'), formatter: Table.api.formatter.datetime, operate: 'RANGE', addclass: 'datetimerange', sortable: true},
                {field: 'updatetime', title: __('更新时间'), formatter: Table.api.formatter.datetime, operate: 'RANGE', addclass: 'datetimerange', sortable: true},
                {field: 'operate', title: __('操作'), table: Table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
            ]
        ]
    });
</script>

